public class 有参有返 {
    public static double triangle(int a ,int b){
        double area=a*b*0.5;
        System.out.println("该三角形面积为"+area);
        return area;
    }
    public static double square(int a ,int b){
        double area=a*b;
        System.out.println("该正方形面积为"+area);
        return area;
    }
    public static double rectangle(int a ,int b){
        double area=a*b;
        System.out.println("该长方形面积为"+area);
        return area;
    }

    public static void main(String[] args) {
        triangle(4,5);
    }
}
